function changeSexStyle(addstyle, substyle) {
	return function () {
		$(addstyle).removeClass("unchecked").addClass("checked");
		$(substyle).removeClass("checked").addClass("unchecked");
	}
}
function w(){

	document.getElementById("sex").value = 'woman';
}

function m(){

		document.getElementById("sex").value ='man';
}
EventUtil.addHandler(window, "load", function(){
	var man = getEl("man");
	var woman = getEl("woman");
	EventUtil.addHandler(woman, "click", changeSexStyle(woman, man));
	EventUtil.addHandler(woman, "click",w);
	EventUtil.addHandler(man, "click", changeSexStyle(man, woman));
	EventUtil.addHandler(man, "click",m);
	var sexValue=document.getElementById("sex").value;
	if(sexValue == "woman"){
		$(man).removeClass("checked").addClass("unchecked");
		$(woman).removeClass("unchecked").addClass("checked");
	}


});
